@import "./variable.less";

// @font-face {
//   font-family: "Baskervville";
//   src: url("./assets/fonts/Baskervville-Regular.ttf") format("truetype");
// }
// @font-face {
//   font-family: "LibreBaskerville";
//   src: url("./assets/fonts/LibreBaskerville-Regular.ttf") format("truetype");
// }

// @font-face {
//   font-family: "Lato";
//   src: url("./assets/fonts/Lato-Regular.ttf") format("truetype");
//   font-weight: normal;
// }
// @font-face {
//   font-family: "Lato";
//   src: url("./assets/fonts/Lato-Bold.ttf") format("truetype");
//   font-weight: bold;
// }

// * {
//   -webkit-touch-callout: none; /*系统默认菜单被禁用*/
//   -webkit-user-select: none; /*webkit浏览器*/
//   -khtml-user-select: none; /*早期浏览器*/
//   -moz-user-select: none; /*火狐*/
//   -ms-user-select: none; /*IE10*/
//   user-select: none;
// }

// input,textarea {
//   -webkit-user-select:auto; /*webkit浏览器*/
//   margin: 0px;
//   padding: 0px;
//   outline: none;
// }

html,
body,
:global(#root) {
  height: 100%;
}

:global {
  .custom_scroll {
    overflow-y: auto;

    &::-webkit-scrollbar {
      width: 5px;
      height: 5px;
      background-color: @bg-secondary;
    }

    &::-webkit-scrollbar-thumb {
      width: 5px;
      background-color: @mask-base;
      border-radius: 5px;
    }

    ::-webkit-scrollbar {
      width: 5px;
      height: 5px;
      background-color: @bg-secondary;
    }

    ::-webkit-scrollbar-thumb {
      width: 5px;
      background-color: @mask-base;
      border-radius: 5px;
    }
  }
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
div,
ol,
dl,
li,
dt,
dd,
span,
i,
del,
b,
a,
sub,
sup,
small,
big,
button {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  font-size: inherit;
  font-style: normal;
  font-weight: inherit;
  color: inherit;
  background: transparent;
  -webkit-appearance: none;
}

a {
  text-decoration: none;
  color: @brand-primary;
  cursor: pointer;

  &:hover {
    text-decoration: none;
    color: @brand-primary-tap;
  }

  transition: color 0.3s;
}

@keyframes autofill {
  to {
    color: currentColor;
    background: transparent;
  }
}

input,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  resize: none;
  border-radius: 6px;

  &::-webkit-input-placeholder {
    color: @color-tip;
  }

  &:-moz-placeholder {
    color: @color-tip;
  }

  &::-moz-placeholder {
    color: @color-tip;
  }

  &:-ms-input-placeholder {
    color: @color-tip;
  }

  &:focus::-webkit-input-placeholder {
    opacity: 0;
  }

  &:focus:-moz-placeholder {
    opacity: 0;
  }

  &:focus::-moz-placeholder {
    opacity: 0;
  }

  &:focus:-ms-input-placeholder {
    opacity: 0;
  }

  &:-webkit-autofill {
    animation-name: autofill;
    animation-fill-mode: both;
  }
}

input::-webkit-search-cancel-button {
  -webkit-appearance: none; //此处只是去掉默认的小×
}

body {
  font: 14px "Lato", Arial, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: @color-base;
  line-height: 1.5;
  overflow-y: auto;
}

#root {
  font-size: 12px;
}

dl,
ol {
  list-style: none;
}

// :global {//CSS Modules 允许使用:global(.className)的语法,声明一个全局规则。凡是这样声明的class,都不会被编译成哈希字符串

//   //编辑器样式
//   .ql-align-justify {
//     text-align: justify;
//   }

//   .ql-align-center {
//     text-align: center;
//   }

//   .ql-align-right {
//     text-align: right;
//   }
// }
